<template>
	<view>
		<view class="ul">
			<navigator url="../changePassword/changePassword?isLoginPass=true" class="li">
				<view class="txt">
					<text>修改登录密码</text>
				</view>
				<view class="li_img_q">
					<text class="cuIcon-right"></text>
				</view>
		
			</navigator >
			<navigator url="../changePassword/changePassword" class="li">
				<view class="txt">
					<text>修改支付密码</text>
				</view>
				<view class="li_img_q">
					<text class="cuIcon-right"></text>
				</view>
					
			</navigator>
			<navigator url="../t-realAuth/t-realAuth" class="li" >
				<view class="txt">
					<text>实名认证</text>
				</view>
				<view class="li_img_q">
					<text class="cuIcon-right"></text>
				</view>
			
			</navigator>
			<view class="li" @tap="writeOff">
				<view class="txt">
					<text>注销帐号</text>
				</view>
				<view class="li_img_q">
					<text class="cuIcon-right"></text>
				</view>
			
			</view>
		</view>
		
		<view class="cu-modal" :class="modalName=='DialogModal1'?'show':''">
			<view class="cu-dialog">
				<view class="cu-bar bg-white justify-end">
					<view class="content">确定注销该帐号</view>
					<view class="action" @tap="hideModal">
						<text class="cuIcon-close text-red"></text>
					</view>
				</view>
				<view class="padding-xl">
					<p>确认无未处理订单</p>
					确认无余额留存
				</view>
				<view class="cu-bar bg-white justify-end">
					<view class="action">
						<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
						<button class="cu-btn bg-green margin-left" @tap="downAccount">确定</button>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				modalName:"",
			}
		},
		methods: {
			//注销帐号
			writeOff(){
				this.modalName="DialogModal1"
			},
			//注销帐号-确定
			downAccount(){
				uni.showToast({
					title:"注销成功",
					duration:3000
				})
				this.modalName=""
				//此处应删除帐号信息
				setTimeout(function() {
					uni.switchTab({
						url:'/pages/mine/mine'
					})
				}, 1000);
			},
			////注销帐号-取消
			hideModal(){
				this.modalName=""
			}
		}
	}
</script>

<style scoped lang="scss">
	.ul {
		background-color: #F8F8F8;
		height: 100vh;
		box-sizing: border-box;
		padding: 40rpx;
		background-color: white;

		.li {
			display: flex;
			justify-content: space-between;
			border-bottom: 1px solid #e1e1e1;

			box-sizing: border-box;
			padding: 30rpx 0rpx;

			.txt {
				font-size: 30rpx;
				vertical-align: middle;

			}

			.li_img_q {
				color: #C0C0C0;
			}
		}
	}
</style>
